Goal of this Rmarkdown document
This Rmarkdown notebook contains a more detailed documentation of how the analysis will be performed, provided with R code when informative. It not only contains the statistical model code, but also the results they produce when applied to the pilot data. At the end of the section we report on a power analysis, providing some insights on how many participants we need to test.
Main Research Questions
Each of the analysis are tailored to provide statistically informed conclusions about the following research questions:
- How does gesturing influence the acoustic production of stress by L2 learners?
- 1A. Does gesturing makes learners more accurate in L2 stress placement?
- 1B. Does gesture gesturing boost the acoustic markers of stress?
- How is gesture-prosody coupling in L2 influenced by competition from the speaker’s L1?
- 2A. Is gesture-prosody sycnhrony affected by stress-match/mismatch?
- 2B. Do correct L2 productions still demonstrate evidence of L1 temporal attraction
Note that we will only provide an analysis for 2B, but will also perform another analysis in the eventual study.
- 2C. Do ‘incorrect L1-like productions’ still demonstrate evidence of L2 temporal attraction in the form of a temporal bias in gestural timing in the direction of the L2 syllable.
Initial descriptive checks of the data
Here we provide a descriptive overview of the syllable identifications relative to target (table 1). In the current pilot data the number of syllables identified by EasyAlign perfectly matched the targeted number of syllables, i.e., in 100% of the trials there were 0 differences in the number of syllable detected versus target.
(#tab:table01)
Table 1. A summary table of percentage of differences between syllables
Table 2 provides the percentages of different type of L2 stress placement matches and mismatches.
(#tab:table02)
Table 2. A summary table of percentage of stress match/mismatch types
| L2 correct |
same |
33.93 |
| L2 incorrect & L1 match |
same |
0.00 |
| L2 incorrect & L1 mismatch |
same |
16.07 |
| L2 correct |
difference |
44.05 |
| L2 incorrect & L1 match |
difference |
0.00 |
| L2 incorrect & L1 mismatch |
difference |
5.95 |
Main Confirmatory Analysis
For all analysis we will use mixed linear regressions with maximum likelihood estimation using R-package nlme. Our models will always have participant and trial ID as random variables. We will always try to fit random slopes, next to random intercepts. With the current pilot data however, adding random slopes resulted in non-converging models. Thus for all models reported we have participant and trial ID as random intercepts. We further report a Cohen’s D for our model predictors using R-package EMAtools. For interaction effects we will follow up with a post-hoc contrast analysis using R-package lsmeans, and we apply a Bonferroni correction for such multiple comparison tests.
Research question 1A: Effect of gesture on stress placement
For the first analysis we simply assess whether the absolute difference in directional stress timing is different for the gesture versus no gesture condition, while also accounting for effects on timing due to stress L1/L2 difference and stress mark presence. If gesture improves stress timing, lower absolutized stress timings are to be expected (i.e., lower deviances from perfect synchrony).
Figure 3 upper panel. Effect of gesture versus no gesture on stress timing 
We first construct a base model predicting the overall mean, with participant and trial ID random variables, and absolute stress timing as the dependent variable. This model is then compared to a model with stress difference + accentedness + gesture condition as main effects.
Code chunk 1. Model research question 1
library(lme4)
D$ppn <- as.factor(D$ppn)
#basemodel predicting the overall mean stress timing
model0 <- glmer(accuracy ~ 1 + (1 | ppn)+(1|target), data = D, family = binomial(link="logit"))
## boundary (singular) fit: see ?isSingular
#alternative model with, stress, accentedness, and gesture versus no gesture as predictors
model1 <- glmer(accuracy ~ condition + (1 | ppn)+(1|target),data = D, family = binomial(link="logit"))
## boundary (singular) fit: see ?isSingular
#alternative model with, stress, accentedness, and gesture versus no gesture as predictors
model2 <- glmer(accuracy ~ condition*accent*stress + (1|ppn) + (1|target), data = D, family = binomial(link="logit"))
#compare models
anovcomp01 <- anova(model0, model1, model2) #test difference basemodel versus model 1
#save model 1 (only gesture condition) results
sum1 <- summary(model1)
Dmod1 <- lme.dscore(model1, D, type="lme4")
#save model 2 (3way interaction gesture, stress, accent) results
sum2 <- summary(model2)
Dmod2 <- lme.dscore(model2, D, type="lme4")
posthoc2 <- lsmeans(model2, list(pairwise ~ condition|accent|stress), adjust="bonferroni")
Click here for model 1 R output(model coefficients, effect sizes)
```r
sum1
```
```
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ condition + (1 | ppn) + (1 | target)
## Data: D
##
## AIC BIC logLik deviance df.resid
## 333.5 348.7 -162.7 325.5 332
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3805 0.2319 0.3243 0.4201 1.2952
##
## Random effects:
## Groups Name Variance Std.Dev.
## target (Intercept) 2.481 1.575
## ppn (Intercept) 0.000 0.000
## Number of obs: 336, groups: target, 84; ppn, 2
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.5265 0.3163 4.827 1.39e-06 ***
## conditiongesture 0.6712 0.3171 2.117 0.0343 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## conditngstr -0.349
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
```
```r
Dmod1
```
```
## t df d
## conditiongesture 2.178583 250 0.2755713
```
Click here for more complex model 2 R output (model coefficients, effect sizes, and posthoc)
```r
sum2
```
```
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ condition * accent * stress + (1 | ppn) + (1 | target)
## Data: D
##
## AIC BIC logLik deviance df.resid
## 329.3 367.5 -154.7 309.3 326
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.0549 0.1733 0.2886 0.4297 1.4229
##
## Random effects:
## Groups Name Variance Std.Dev.
## target (Intercept) 1.862e+00 1.3644695
## ppn (Intercept) 8.270e-08 0.0002876
## Number of obs: 336, groups: target, 84; ppn, 2
##
## Fixed effects:
## Estimate Std. Error
## (Intercept) 0.52733 0.47818
## conditiongesture 0.70706 0.53931
## accentstress mark present 0.29515 0.68473
## stressdifference 2.71721 0.88362
## conditiongesture:accentstress mark present 0.08941 0.78463
## conditiongesture:stressdifference -1.05449 0.99769
## accentstress mark present:stressdifference -1.75658 1.12973
## conditiongesture:accentstress mark present:stressdifference 1.41977 1.35344
## z value Pr(>|z|)
## (Intercept) 1.103 0.2701
## conditiongesture 1.311 0.1898
## accentstress mark present 0.431 0.6664
## stressdifference 3.075 0.0021 **
## conditiongesture:accentstress mark present 0.114 0.9093
## conditiongesture:stressdifference -1.057 0.2905
## accentstress mark present:stressdifference -1.555 0.1200
## conditiongesture:accentstress mark present:stressdifference 1.049 0.2942
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndtng accnmp strssd cnd:mp cndtn: amprs:
## conditngstr -0.506
## accntstrsmp -0.686 0.365
## strssdffrnc -0.511 0.302 0.385
## cndtngst:mp 0.357 -0.678 -0.516 -0.186
## cndtngstr:s 0.272 -0.542 -0.198 -0.614 0.366
## accnmprsnt: 0.409 -0.228 -0.609 -0.762 0.311 0.475
## cndtngs:mp: -0.200 0.400 0.302 0.454 -0.578 -0.737 -0.560
```
```r
Dmod2
```
```
## t
## conditiongesture 1.554919e+00
## accentstress mark present 4.856787e-01
## stressdifference 3.399751e+00
## conditiongesture:accentstress mark present -4.475099e-16
## conditiongesture:stressdifference -1.319392e+00
## accentstress mark present:stressdifference -1.373707e+00
## conditiongesture:accentstress mark present:stressdifference 9.329514e-01
## df
## conditiongesture 246.9997
## accentstress mark present 155.8566
## stressdifference 155.8566
## conditiongesture:accentstress mark present 246.9997
## conditiongesture:stressdifference 246.9997
## accentstress mark present:stressdifference 155.8566
## conditiongesture:accentstress mark present:stressdifference 246.9997
## d
## conditiongesture 1.978744e-01
## accentstress mark present 7.780662e-02
## stressdifference 5.446463e-01
## conditiongesture:accentstress mark present -5.694877e-17
## conditiongesture:stressdifference -1.679020e-01
## accentstress mark present:stressdifference -2.200703e-01
## conditiongesture:accentstress mark present:stressdifference 1.187246e-01
```
```r
posthoc2
```
```
## $`lsmeans of condition | accent, stress`
## accent = stress mark absent, stress = same:
## condition lsmean SE df asymp.LCL asymp.UCL
## nogesture 0.527 0.478 Inf -0.410 1.46
## gesture 1.234 0.509 Inf 0.238 2.23
##
## accent = stress mark present, stress = same:
## condition lsmean SE df asymp.LCL asymp.UCL
## nogesture 0.822 0.498 Inf -0.154 1.80
## gesture 1.619 0.550 Inf 0.540 2.70
##
## accent = stress mark absent, stress = difference:
## condition lsmean SE df asymp.LCL asymp.UCL
## nogesture 3.245 0.760 Inf 1.755 4.73
## gesture 2.897 0.695 Inf 1.534 4.26
##
## accent = stress mark present, stress = difference:
## condition lsmean SE df asymp.LCL asymp.UCL
## nogesture 1.783 0.563 Inf 0.679 2.89
## gesture 2.945 0.712 Inf 1.549 4.34
##
## Results are given on the logit (not the response) scale.
## Confidence level used: 0.95
##
## $`pairwise differences of condition | accent, stress`
## accent = stress mark absent, stress = same:
## 3 estimate SE df z.ratio p.value
## nogesture - gesture -0.707 0.539 Inf -1.311 0.1898
##
## accent = stress mark present, stress = same:
## 3 estimate SE df z.ratio p.value
## nogesture - gesture -0.796 0.577 Inf -1.381 0.1672
##
## accent = stress mark absent, stress = difference:
## 3 estimate SE df z.ratio p.value
## nogesture - gesture 0.347 0.839 Inf 0.414 0.6786
##
## accent = stress mark present, stress = difference:
## 3 estimate SE df z.ratio p.value
## nogesture - gesture -1.162 0.717 Inf -1.619 0.1054
##
## Results are given on the log odds ratio (not the response) scale.
```
1B: Does gesture gesturing boost the acoustic markers of stress?
Does gesture vs. no gesture affect acoustic markers of stress? We perform a mixed linear regression with normalized acoustic markers as DV, and acoustic marker (peak F0, peak envelope, and duration) x condition as independent variable.
Figure 4. Effect of gesture vs. no gesture on acoustic markers of stress
Code chunk 3. Gesture and acoustic output
Dlong <- gather(D, "marker", "acoust_out", 13:15)
#alternative model with gesture versus no gesture as predictor
model0 <- lme(acoust_out~1, data = Dlong, random = list(~1|ppn, ~1|target), method = "ML", na.action = na.exclude)
model1 <- lme(acoust_out~marker*condition, data = Dlong, random = list(~1|ppn, ~1|target), method = "ML", na.action = na.exclude)
anova(model0, model1) #test difference basemodel versus model 1
## Model df AIC BIC logLik Test L.Ratio p-value
## model0 1 4 1951.533 1971.196 -971.7666
## model1 2 9 1534.941 1579.182 -758.4703 1 vs 2 426.5926 <.0001
#summary model 3 post hoc
anovamod0mod1 <- anova(model0, model1)
sum1 <- summary(model1)
posthocsum1 <- lsmeans(model1, list(pairwise ~ condition|marker), adjust="bonferroni")
Dmod1 <- lme.dscore(model1, Dlong, type="nlme")
Click here for model 1 R output
```r
sum1
```
```
## Linear mixed-effects model fit by maximum likelihood
## Data: Dlong
## AIC BIC logLik
## 1534.941 1579.182 -758.4703
##
## Random effects:
## Formula: ~1 | ppn
## (Intercept)
## StdDev: 1.375216e-05
##
## Formula: ~1 | target %in% ppn
## (Intercept) Residual
## StdDev: 0.08539542 0.506822
##
## Fixed effects: acoust_out ~ marker * condition
## Value Std.Error DF t-value p-value
## (Intercept) 1.5512255 0.03977187 835 39.00308 0.0000
## markerpeakF0z -0.5074599 0.05546413 835 -9.14933 0.0000
## markersDURz -0.7038124 0.05546413 835 -12.68951 0.0000
## conditiongesture 0.1850414 0.05546413 835 3.33624 0.0009
## markerpeakF0z:conditiongesture -0.1713849 0.07843812 835 -2.18497 0.0292
## markersDURz:conditiongesture -0.3458323 0.07843812 835 -4.40898 0.0000
## Correlation:
## (Intr) mrkrF0 mrkDUR cndtng mrkF0:
## markerpeakF0z -0.697
## markersDURz -0.697 0.500
## conditiongesture -0.697 0.500 0.500
## markerpeakF0z:conditiongesture 0.493 -0.707 -0.354 -0.707
## markersDURz:conditiongesture 0.493 -0.354 -0.707 -0.707 0.500
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -4.32238038 -0.52000609 0.00753372 0.54513919 4.64779877
##
## Number of Observations: 1008
## Number of Groups:
## ppn target %in% ppn
## 2 168
```
Click here for model 1 summary for research question 2
We again test this model against a base model predicting the overall mean. The model with acoustic markers x condition was a more reliable model than the base model predicting the overall mean of the acoustic output, Chi-sq (5) = 426.593, p = 0.000. Table 3 provides an overview of the model predictors.
(#tab:table03)
Table 3. Model fitted predictions
| (Intercept) |
1.55 |
0.04 |
835.00 |
39.00 |
0.00 |
NA |
| markerpeakF0z |
-0.51 |
0.06 |
835.00 |
-9.15 |
0.00 |
-0.63 |
| markersDURz |
-0.70 |
0.06 |
835.00 |
-12.69 |
0.00 |
-0.88 |
| conditiongesture |
0.19 |
0.06 |
835.00 |
3.34 |
0.00 |
0.23 |
| markerpeakF0z:conditiongesture |
-0.17 |
0.08 |
835.00 |
-2.18 |
0.03 |
-0.15 |
| markersDURz:conditiongesture |
-0.35 |
0.08 |
835.00 |
-4.41 |
0.00 |
-0.31 |
We will further perform a post-hoc analysis disentangling these interaction effects, where we assess for which acoustic marker gesture vs. no gesture affected acoustic output. Further, if there is an effect of gesture on stress realization, we will assess in a more complex model whether stress mark presence and L1-L2 stress mismatch interact with the gesture condition effect on stress realization.
Click here for posthoc model 1 output
```r
posthocsum1
```
```
## $`lsmeans of condition | marker`
## marker = peakAMPz:
## condition lsmean SE df lower.CL upper.CL
## nogesture 1.551 0.0398 1 1.046 2.06
## gesture 1.736 0.0398 1 1.231 2.24
##
## marker = peakF0z:
## condition lsmean SE df lower.CL upper.CL
## nogesture 1.044 0.0398 1 0.538 1.55
## gesture 1.057 0.0398 1 0.552 1.56
##
## marker = sDURz:
## condition lsmean SE df lower.CL upper.CL
## nogesture 0.847 0.0398 1 0.342 1.35
## gesture 0.687 0.0398 1 0.181 1.19
##
## Degrees-of-freedom method: containment
## Confidence level used: 0.95
##
## $`pairwise differences of condition | marker`
## marker = peakAMPz:
## 2 estimate SE df t.ratio p.value
## nogesture - gesture -0.1850 0.0555 835 -3.336 0.0009
##
## marker = peakF0z:
## 2 estimate SE df t.ratio p.value
## nogesture - gesture -0.0137 0.0555 835 -0.246 0.8056
##
## marker = sDURz:
## 2 estimate SE df t.ratio p.value
## nogesture - gesture 0.1608 0.0555 835 2.899 0.0038
##
## Degrees-of-freedom method: containment
```
Research question 2A: Is gesture-prosody synchrony affected by stress-match/mismatch?
From the previous analyses we should know whether stress timing performance and acoustic stress marking increases or decreases as a function of gesture, as well as the possible role of stress difference, and accentedness in stress timing. A further question is whether the timing between gesture and speech is affected by stress difference and accentedness, which would signal that gesture does not simply always synchronize with speech, but that coordination is destabilized due to difficulties of reaching the L2 targets without orthographic cues or with L1 stress competitor.
Using a similar linear mixed modeling approach as the previous analysis we compare a base model with models with stress difference and accentedness (and their possible interactions) as predictors for the absolutized gesture-speech asynchrony.
Figure 5. Gesture-speech (a)synchrony depending on stress difference and accentedness
Click here for posthoc model 1 and 2 output
```r
sum1
```
```
## Linear mixed-effects model fit by maximum likelihood
## Data: subD
## AIC BIC logLik
## 2047.489 2066.233 -1017.744
##
## Random effects:
## Formula: ~1 | ppn
## (Intercept)
## StdDev: 0.004390321
##
## Formula: ~1 | target %in% ppn
## (Intercept) Residual
## StdDev: 103.4332 1.721462
##
## Fixed effects: abs_asynchrony ~ stress + accent
## Value Std.Error DF t-value p-value
## (Intercept) 88.90476 13.94886 164 6.373623 0.0000
## stressdifference 14.71429 16.10675 164 0.913548 0.3623
## accentstress mark present -10.09524 16.10675 164 -0.626771 0.5317
## Correlation:
## (Intr) strssd
## stressdifference -0.577
## accentstress mark present -0.577 0.000
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -0.016668525 -0.011084262 -0.007009053 0.007736769 0.084032038
##
## Number of Observations: 168
## Number of Groups:
## ppn target %in% ppn
## 2 168
```
```r
sum2
```
```
## Linear mixed-effects model fit by maximum likelihood
## Data: subD
## AIC BIC logLik
## 2049.444 2071.312 -1017.722
##
## Random effects:
## Formula: ~1 | ppn
## (Intercept)
## StdDev: 0.0044314
##
## Formula: ~1 | target %in% ppn
## (Intercept) Residual
## StdDev: 103.4192 1.729301
##
## Fixed effects: abs_asynchrony ~ stress * accent
## Value Std.Error DF t-value
## (Intercept) 87.21429 16.15363 163 5.399053
## stressdifference 18.09524 22.84468 163 0.792099
## accentstress mark present -6.71429 22.84468 163 -0.293910
## stressdifference:accentstress mark present -6.76190 32.30725 163 -0.209300
## p-value
## (Intercept) 0.0000
## stressdifference 0.4295
## accentstress mark present 0.7692
## stressdifference:accentstress mark present 0.8345
## Correlation:
## (Intr) strssd accnmp
## stressdifference -0.707
## accentstress mark present -0.707 0.500
## stressdifference:accentstress mark present 0.500 -0.707 -0.707
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -0.017022149 -0.010997239 -0.007258370 0.008047324 0.084164000
##
## Number of Observations: 168
## Number of Groups:
## ppn target %in% ppn
## 2 168
```
```r
posthoc2
```
```
## $`lsmeans of stress | accent`
## accent = stress mark absent:
## stress lsmean SE df lower.CL upper.CL
## same 87.2 16.2 1 -118.0 292
## difference 105.3 16.2 1 -99.9 311
##
## accent = stress mark present:
## stress lsmean SE df lower.CL upper.CL
## same 80.5 16.2 1 -124.8 286
## difference 91.8 16.2 1 -113.4 297
##
## Degrees-of-freedom method: containment
## Confidence level used: 0.95
##
## $`pairwise differences of stress | accent`
## accent = stress mark absent:
## 2 estimate SE df t.ratio p.value
## same - difference -18.1 22.8 163 -0.792 0.4295
##
## accent = stress mark present:
## 2 estimate SE df t.ratio p.value
## same - difference -11.3 22.8 163 -0.496 0.6205
##
## Degrees-of-freedom method: containment
```
Click here for model 2 summary for research question 3
For our pilot data, including stress difference and accentedness as predictors in an alternative model was not a more reliable than the base model predicting the overall mean of the absolutized gesture-speech (a)synchrony, Chi-sq (2) = 1.245, p = 0.537, and adding interactions between stress difference and accentedness also did not further improve predictions of gesture-speech asynchrony, Chi-sq (3) = 1.290, p = 0.732. Table 4 provides an overview of the model predictors for the model without interactions.
(#tab:table04)
Table 4. Model fitted predictions
| (Intercept) |
88.90 |
13.95 |
164.00 |
6.37 |
0.00 |
NA |
| stressdifference |
14.71 |
16.11 |
164.00 |
0.91 |
0.36 |
0.14 |
| accentstress mark present |
-10.10 |
16.11 |
164.00 |
-0.63 |
0.53 |
-0.10 |
2B. Do correct L2 productions still demonstrate evidence of L1 temporal attraction
From the previous analysis we will know if gesture-speech synchrony can be affected by trial conditions that may complicate correct stress placement. If indeed gesture-speech (a)synchrony is affected, we can wonder about how gesture and speech temporally diverge when they are more asynchronous. We will assess this by looking at the gesture-speech asynchrony when speech stress peak is correctly placed a) on the L2 target (2B), b) when placed incorrectly on L1 target (2C). Figure 6 provides an example of our pilot data results where we report directional gesture-speech (a)synchrony when acoustic stress is correctly placed on the L2 target. We will assess whether gesture is attracted to be asynchronous with speech in the direction of the L1 stress competitor. We compare this directional (a)synchrony when there is a L1/L2 stress difference, versus when there is no stress difference. If there is an attraction of gesture towards L1, we would predict the positive effect of stress difference on the directional gesture-speech (a)synchrony as compared to no stress difference condition. The modeling we will perform is similar to our previous analysis, and are reported here below.
Code Chunk 4. Conditional analysis 3a/3b
#basemodel predicting the overall asynchrony
model0 <- lme(asynchrony_L2L1~1, data = subD, random = list(~1|ppn, ~1|target), method = "ML", na.action = na.exclude)
#alternative model stress versus no stress difference
model1 <- lme(asynchrony_L2L1~stress, data = subD, random = list(~1|ppn, ~1|target), method = "ML", na.action = na.exclude)
anova(model0, model1) #test difference basemodel versus model 1
## Model df AIC BIC logLik Test L.Ratio p-value
## model0 1 4 2133.622 2146.118 -1062.811
## model1 2 5 2135.608 2151.228 -1062.804 1 vs 2 0.01353714 0.9074
summary(model1)
## Linear mixed-effects model fit by maximum likelihood
## Data: subD
## AIC BIC logLik
## 2135.608 2151.228 -1062.804
##
## Random effects:
## Formula: ~1 | ppn
## (Intercept)
## StdDev: 0.008885091
##
## Formula: ~1 | target %in% ppn
## (Intercept) Residual
## StdDev: 135.2493 2.397586
##
## Fixed effects: asynchrony_L2L1 ~ stress
## Value Std.Error DF t-value p-value
## (Intercept) -27.095238 14.84788 165 -1.8248560 0.0698
## stressdifference -2.428571 20.99807 165 -0.1156569 0.9081
## Correlation:
## (Intr)
## stressdifference -0.707
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -0.057509243 -0.007750989 0.002239972 0.007144199 0.085892616
##
## Number of Observations: 168
## Number of Groups:
## ppn target %in% ppn
## 2 168
Power analysis
To provide some indication on the amount of data we need to collect to get meaningful results, we perform a power analysis concerning the first confirmatory research question. We will assess the power of a model with three main effects ( stress difference, accentedness, and gesture condition) on directional stress timing at an adjusted alpha of .05/3, and identify how many subjects we need to detect a main effects at a power of 80%. We use R-package ‘mixedpower’ that is designed to simulate data and power of linear mixed effects models from pilot data (see Kumle et al. 2021 for a tutorial). Table 5 shows the power estimates for the effects for N of 20 to 60 participants. It can be seen that for the effect of gesture and stress we already have enough power to detect an actual effect at N = 20 and higher. Given that accentedness is not as important of a variable as gesture condition and stress differences, we can conclude from this that an absolute minimum of 20 participants would suffice for ensuring a meaningful test of our confirmatory research question 1. Note however, that we will aim to collect 40 participants.
We further report in Table 6 the power calculations are given for a more complex model with a three-way interaction, and the lower order interaction effects between stress, accentedness, and gesture condition. It can be seen that three-way interactions are likely to have low power, but that two-way interactions could become more meaningful at N = 60. Therefore we will set our ideal upper bound at N = 60.
Table 5. Power analysis simple model
#for details on this power analysis see
#https://link.springer.com/article/10.3758/s13428-021-01546-0
D$ppn <- as.numeric(as.factor(D$ppn)) #random variable to extend
#make a lme4 model instead of lme
model1 <- glmer(accuracy ~ condition + (1 | ppn)+(1|target),data = D, family = binomial(link="logit"))
## boundary (singular) fit: see ?isSingular
#Power analysis
power_model1 <- mixedpower(model = model1, data = D,
fixed_effects = c("condition"),
simvar = "ppn", steps = c(20,30,40,50, 60),
critical_value = 2.14441, n_sim = 500)
## [1] "Estimating power for step:"
## [1] 20
## [1] "Simulations for step 20 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 30
## [1] "Simulations for step 30 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 40
## [1] "Simulations for step 40 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 50
## [1] "Simulations for step 50 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 60
## [1] "Simulations for step 60 are based on 500 successful single runs"
#plot power analysis results
tab05 <- power_model1
apa_table(
tab05
, caption = "Power fixed effects for number of participants"
)
(#tab:unnamed-chunk-14)
Power fixed effects for number of participants
| conditiongesture |
1.00 |
1.00 |
1.00 |
1.00 |
1.00 |
databased |
conditiongesture |
Table 6. Three way interaction model
#alternative model with, stress, accentedness, and gesture versus no gesture as predictors
model2 <- glmer(accuracy ~ condition * accent * stress + (1 | ppn)+(1|target),data = D, family = binomial(link="logit"))
#Power analysis 2
power_model2 <- mixedpower(model = model2, data = D,
fixed_effects = c("condition", "stress", "accent"),
simvar = "ppn", steps = c(20,30,40,50, 60),
critical_value = 2.14441, n_sim = 500)
## [1] "Estimating power for step:"
## [1] 20
## [1] "Simulations for step 20 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 30
## [1] "Simulations for step 30 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 40
## [1] "Simulations for step 40 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 50
## [1] "Simulations for step 50 are based on 500 successful single runs"
## [1] "Estimating power for step:"
## [1] 60
## [1] "Simulations for step 60 are based on 500 successful single runs"
tab06 <- power_model2
apa_table(
tab06
, caption = "Power fixed effects for number of participants"
)
(#tab:unnamed-chunk-15)
Power fixed effects for number of participants
| conditiongesture |
0.97 |
1.00 |
1.00 |
1.00 |
1.00 |
databased |
conditiongesture |
| accentstress mark present |
0.20 |
0.33 |
0.37 |
0.47 |
0.57 |
databased |
accentstress mark present |
| stressdifference |
1.00 |
1.00 |
1.00 |
1.00 |
1.00 |
databased |
stressdifference |
| conditiongesture:accentstress mark present |
0.01 |
0.03 |
0.04 |
0.03 |
0.03 |
databased |
conditiongesture:accentstress mark present |
| conditiongesture:stressdifference |
0.77 |
0.93 |
0.98 |
1.00 |
1.00 |
databased |
conditiongesture:stressdifference |
| accentstress mark present:stressdifference |
1.00 |
1.00 |
1.00 |
1.00 |
1.00 |
databased |
accentstress mark present:stressdifference |
| conditiongesture:accentstress mark present:stressdifference |
0.82 |
0.97 |
0.98 |
1.00 |
1.00 |
databased |
conditiongesture:accentstress mark present:stressdifference |